<%@ page import="com.xdwanj.util.UrlUtil" %>
<%@ page import="com.xdwanj.servlet.AdminUserServlet" %><%--
  Created by IntelliJ IDEA.
  User: USS Essex
  Date: 2021/11/15
  Time: 18:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<html>
<head>
    <title>管理员操作界面</title>
    <link href="${pageContext.request.contextPath}/util/bootstrap-3.4.1-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/util/jquery-3.2.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/util/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/util/bootstrap-select-1.13.14/dist/js/bootstrap-select.js"></script>
    <link href="${pageContext.request.contextPath}/util/bootstrap-select-1.13.14/dist/css/bootstrap-select.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/AdminUser.css/" rel="stylesheet">
</head>
<body>

<div class="container-fluid">
    <div class="row">
        <%--功能区--%>
        <div class="col-md-2 mh-switch-wrap">
            <div class="mh-switch">
                <ul class="nav nav-pills  nav-stacked">
                    <li role="presentation" id="mh-fun-admin-user"><a
                            href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING, new String[]{AdminUserServlet.METHOD,AdminUserServlet.FIND_USER})%>">用户列表</a>
                    </li>
                    <li role="presentation" id="mh-fun-admin-pet"><a
                            href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING, new String[]{AdminUserServlet.METHOD,AdminUserServlet.FIND_PET})%>">宠物列表</a>
                    </li>
                    <li role="presentation" id="mh-fun-admin-emp"><a
                            href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING, new String[]{AdminUserServlet.METHOD,AdminUserServlet.FIND_EMP})%>">员工列表</a>
                    </li>
                    <li role="presentation" id="mh-fun-admin-commodity"><a
                            href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING, new String[]{AdminUserServlet.METHOD,AdminUserServlet.FIND_COMMODITY})%>">商品列表</a>
                    </li>
                    <li role="presentation" id="mh-fun-admin-shoppingCart"><a href="#">购物车列表</a></li>
                    <li role="presentation" id="mh-fun-admin-order"><a
                            href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING, new String[]{AdminUserServlet.METHOD,AdminUserServlet.FIND_ORDER})%>">订单列表</a>
                    </li>
                </ul>
            </div>
        </div>

        <div class="col-md-10 mh-operate-wrap">
            <div>
                <p class="col-md-offset-2 col-md-10 text-danger">${error}</p>
            </div>
            <%--@elvariable id="markFun" type="java.lang.String"--%>
            <c:if test="${markFun != null && 'user'eq markFun}">
                <div class="col-lg-2">
                    <form action="${pageContext.request.contextPath}/admin?method=findUser" method="post">
                        <label>用户名</label>
                        <div class="input-group">
                            <input type="text" class="form-control" name="username" placeholder="请输入用户名">
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="submit">搜索</button>
                            </span>
                        </div>
                    </form>
                </div>

                <div class="col-md-12">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>
                                id
                            </th>
                            <th>
                                用户名
                            </th>
                            <th>
                                昵称
                            </th>
                            <th>
                                密码
                            </th>
                            <th>
                                性别
                            </th>
                            <th>
                                邮箱
                            </th>
                            <th>
                                电话号码
                            </th>
                            <th>
                                注册日期
                            </th>
                            <th>
                                地址
                            </th>
                            <th>
                                生日
                            </th>
                            <th>
                                头像
                            </th>
                            <th>
                                提交或删除
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                            <%--@elvariable id="userList" type="com.xdwanj.util.PageBean"--%>
                            <%--@elvariable id="user" type="com.xdwanj.pojo.User"--%>
                        <c:forEach items="${userList.content}" var="user" varStatus="status">
                            <tr>
                                <form action="${pageContext.request.contextPath}/admin?method=updateUser" method="post">
                                    <td>
                                        <input type="text" class="form-control"
                                               name="uid"
                                               value="${user.id}">
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="username"
                                                   value="${user.username}"
                                                   placeholder="请输入用户名">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="name"
                                                   value="${user.name}"
                                                   placeholder="请输入昵称">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="password"
                                                   value="${user.password}"
                                                   placeholder="请输入密码">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="sex"
                                                   value="${user.sex}"
                                                   placeholder="请输入性别">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="e1" class="form-control"
                                                   name="email"
                                                   value="${user.email}"
                                                   placeholder="请输入邮箱">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="phone"
                                                   value="${user.phoneNum}"
                                                   placeholder="请输入电话号码">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="date" class="form-control"
                                                   name="registerDate"
                                                   value="<fmt:formatDate value="${user.registerDate}" pattern="yyyy-MM-dd"/>"
                                                   placeholder="请输入注册日期">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="address"
                                                   value="${user.address}"
                                                   placeholder="请输入地址">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input id="birthday" type="date" class="form-control"
                                                   name="birthday"
                                                   value="<fmt:formatDate value="${user.birthday}" pattern="yyyy-MM-dd"/>"
                                                   placeholder="请输入生日">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="image"
                                                   value="${user.image}"
                                                   placeholder="请输入头像">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="btn-group">
                                            <button class="btn btn-default dropdown-toggle" type="button"
                                                    data-toggle="dropdown"
                                                    aria-haspopup="true" aria-expanded="true">
                                                请选择
                                                <span class="caret"></span>
                                            </button>
                                            <ul class="dropdown-menu">
                                                <li>
                                                    <button class="btn btn-default" type="submit">提交
                                                    </button>
                                                </li>
                                                <li>
                                                    <button type="button" class="btn btn-default"
                                                            onclick="window.location.href='${pageContext.request.contextPath}/admin?method=deleteUser&uid=${user.id}'">
                                                        删除
                                                    </button>
                                                </li>
                                                <li role="separator" class="divider"></li>
                                            </ul>
                                        </div>
                                    </td>
                                </form>
                            </tr>
                        </c:forEach>
                        <tr>
                            <form action="${pageContext.request.contextPath}/admin?method=addUser" method="post">
                                <td>
                                    id
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="username"
                                               placeholder="请输入用户名">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="name"
                                               placeholder="请输入昵称">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="password"
                                               placeholder="请输入密码">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="sex"
                                               placeholder="请输入性别">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="e1" class="form-control"
                                               name="email"
                                               placeholder="请输入邮箱">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="phone"
                                               placeholder="请输入电话号码">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="date" class="form-control"
                                               name="registerDate"
                                               pattern="yyyy-MM-dd"/>
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="address"
                                               placeholder="请输入地址">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="date" class="form-control"
                                               name="birthday"
                                               pattern="yyyy-MM-dd"/>
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="image"
                                               placeholder="请输入头像">
                                    </div>
                                </td>
                                <td>
                                    <button class="btn btn-default" type="submit">提交
                                    </button>
                                </td>
                            </form>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <c:if test="${markFun != null && 'user' eq markFun}">
                    <%--@elvariable id="userList" type="com.xdwanj.util.PageBean"--%>
                    <%--@elvariable id="user" type="com.xdwanj.util.PageBean"--%>
                    <nav>
                        <ul class="pagination">
                            <li>
                                <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_USER})%>&currentPageNo=${userList.currentPageNo-1}"
                                   aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>

                            <c:forEach begin="1" end="${userList.totalPageCount}" varStatus="status">
                                <c:if test="${status.index == userList.currentPageNo}">
                                    <li class="active">
                                        <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_USER})%>&currentPageNo=${status.index}">
                                                ${status.index}</a>
                                    </li>
                                </c:if>
                                <c:if test="${status.index != userList.currentPageNo}">
                                    <li>
                                        <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_USER})%>&currentPageNo=${status.index}">
                                                ${status.index}</a>
                                    </li>
                                </c:if>
                            </c:forEach>

                            <li>
                                <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_USER})%>&currentPageNo=${userList.currentPageNo+1}"
                                   aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>

                        </ul>
                    </nav>
                </c:if>
            </c:if>


            <c:if test="${markFun != null && 'pet'eq markFun}">
                <div class="col-lg-2">
                    <form action="${pageContext.request.contextPath}/admin?method=findPet" method="post">
                        <label>宠物名</label>
                        <div class="input-group">
                            <input type="text" name="petName" class="form-control" placeholder="请输入宠物名">
                            <span class="input-group-btn">
                        <button class="btn btn-default" type="submit">搜索</button>
                    </span>
                        </div>
                    </form>
                </div>
                <div class="col-md-12">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>
                                id
                            </th>
                            <th>
                                宠物名
                            </th>
                            <th>
                                年龄
                            </th>
                            <th>
                                种类
                            </th>
                            <th>
                                性别
                            </th>
                            <th>
                                重量
                            </th>
                            <th>
                                宠物状态
                            </th>
                            <th>
                                是否阉割
                            </th>
                            <th>
                                等级
                            </th>
                            <th>
                                请输入驱虫日期
                            </th>
                            <th>
                                主人id
                            </th>
                            <th>
                                提交或删除
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                            <%--@elvariable id="petList" type="com.xdwanj.util.PageBean"--%>
                            <%--@elvariable id="pet" type="com.xdwanj.pojo.Pet"--%>
                        <c:forEach items="${petList.content}" var="pet" varStatus="status">
                            <tr>
                                <form action="${pageContext.request.contextPath}/admin?method=updatePet" method="post">
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="petId"
                                                   value="${pet.id}">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="petName" value="${pet.name}"
                                                   placeholder="请输入宠物名">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="petAge" value="${pet.age}"
                                                   placeholder="请输入年龄">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="petType"
                                                   value="${pet.petType}" placeholder="请输入种类">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="petSex" value="${pet.sex}"
                                                   placeholder="请输入性别">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="petWeight"
                                                   value="${pet.weight}" placeholder="请输入重量">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="petInfo" value="${pet.info}"
                                                   placeholder="请输入宠物状态">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="petSterilization"
                                                   value="${pet.sterilization}" placeholder="请输入是否阉割">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="petLevel" value="${pet.level}"
                                                   placeholder="请输入等级">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="date" class="form-control" name="petExpellingParasiteDate"
                                                   value="<fmt:formatDate value="${pet.expellingParasiteDate}" pattern="yyyy-MM-dd"/>"
                                                   placeholder="请输入驱虫日期">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="uid" value="${pet.userId}"
                                                   placeholder="主人id">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="dropdown">

                                            <button class="btn btn-default dropdown-toggle" type="button"
                                                    data-toggle="dropdown"
                                                    aria-haspopup="true" aria-expanded="true">
                                                请选择
                                                <span class="caret"></span>
                                            </button>
                                            <ul class="dropdown-menu">
                                                <li>
                                                    <button class="btn btn-default" type="submit">提交
                                                    </button>
                                                </li>
                                                <li>
                                                    <button type="button" class="btn btn-default"
                                                            onclick="window.location.href='${pageContext.request.contextPath}/admin?method=deletePet&petId=${pet.id}'">
                                                        删除
                                                    </button>
                                                </li>
                                                <li role="separator" class="divider"></li>
                                            </ul>
                                        </div>
                                    </td>
                                </form>
                            </tr>
                        </c:forEach>
                        <tr>
                            <form action="${pageContext.request.contextPath}/admin?method=addPet" method="post">
                                <td>
                                    id
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="petName" placeholder="请输入宠物名">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="petAge" placeholder="请输入年龄">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="petType" placeholder="请输入种类">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="petSex" placeholder="请输入性别">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="petWeight" placeholder="请输入重量">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="petInfo" placeholder="请输入宠物状态">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="petSterilization"
                                               placeholder="请输入是否阉割">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="petLevel" placeholder="请输入等级">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="date" class="form-control" name="petExpellingParasiteDate"
                                               placeholder="请输入驱虫日期">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="uid" placeholder="主人id">
                                    </div>
                                </td>
                                <td>
                                    <button class="btn btn-default" type="submit">提交</button>
                                </td>
                            </form>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <c:if test="${markFun != null && 'pet' eq markFun}">
                    <%--@elvariable id="petList" type="com.xdwanj.util.PageBean"--%>
                    <%--@elvariable id="pet" type="com.xdwanj.util.PageBean"--%>
                    <nav>
                        <ul class="pagination">
                            <li>
                                <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_PET})%>&currentPageNo=${petList.currentPageNo-1}"
                                   aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>

                            <c:forEach begin="1" end="${petList.totalPageCount}" varStatus="status">
                                <c:if test="${status.index == petList.currentPageNo}">
                                    <li class="active">
                                        <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_PET})%>&currentPageNo=${status.index}">
                                                ${status.index}</a>
                                    </li>
                                </c:if>
                                <c:if test="${status.index != petList.currentPageNo}">
                                    <li>
                                        <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_PET})%>&currentPageNo=${status.index}">
                                                ${status.index}</a>
                                    </li>
                                </c:if>
                            </c:forEach>

                            <li>
                                <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_PET})%>&currentPageNo=${petList.currentPageNo+1}"
                                   aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>

                        </ul>
                    </nav>
                </c:if>
            </c:if>


            <c:if test="${markFun != null && 'emp'eq markFun}">
                <div class="col-lg-3">
                    <label>员工名</label>
                    <form action="${pageContext.request.contextPath}/admin?method=findEmp" method="post">
                        <div class="input-group">
                            <input type="text" class="form-control" name="empName" placeholder="请输入员工名">
                            <span class="input-group-btn" style="width: 15vh;">
                                    <select class="form-control " name="empRole">
                                        <%--@elvariable id="role" type="com.xdwanj.pojo.Role"--%>
                                        <%--@elvariable id="roleList" type="java.util.List"--%>
                                        <c:forEach items="${roleList}" var="role">
                                            <option value="${role.id}">${role.roleName}</option>
                                        </c:forEach>
                                    </select>
                            <button class="btn btn-default" type="submit">搜索</button>
                        </span>
                        </div>
                    </form>
                </div>
                <div class="col-md-12">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>
                                id
                            </th>
                            <th>
                                员工名
                            </th>
                            <th>
                                职能
                            </th>
                            <th>
                                性别
                            </th>
                            <th>
                                生日
                            </th>
                            <th>
                                年龄
                            </th>
                            <th>
                                工资
                            </th>
                            <th>
                                电话号码
                            </th>
                            <th>
                                邮箱
                            </th>
                            <th>
                                提交或删除
                            </th>
                        </tr>
                        </thead>
                            <%--@elvariable id="empList" type="com.xdwanj.util.PageBean"--%>
                        <c:forEach items="${empList.content}" var="emp" varStatus="empStatus">
                        <tr>
                            <form action="${pageContext.request.contextPath}/admin?method=updateEmp" method="post">
                                <td>
                                    <input name="empId" value="${emp.id}">
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empName" value="${emp.name}"
                                               placeholder="请输入员工名">
                                    </div>
                                </td>
                                <td>
                                    <select id="emp1" class="selectpicker show-tick form-control " multiple="multiple"
                                        <%--data-live-search="true"--%>
                                    >
                                            <%--@elvariable id="emp" type="com.xdwanj.pojo.Emp"--%>
                                            <%--@elvariable id="roleList" type="java.util.List"--%>
                                        <c:forEach items="${roleList}" var="role" varStatus="roleStatus">
                                            <option value="${role.id}:${role.roleName}" autocomplete="off"
                                                    <c:if test="${emp.roleBool.get(roleStatus.index) eq true}">
                                                        selected="selected"
                                                    </c:if> >
                                                    ${role.id}:${role.roleName}
                                            </option>
                                        </c:forEach>
                                    </select>
                                    <input class="selectValue" name="selectValue" type="hidden"/>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empSex" value="${emp.sex}"
                                               placeholder="请输入性别">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="date" class="form-control" name="empBirthday"
                                               value="<fmt:formatDate value="${emp.birthday}" pattern="yyyy-MM-dd"/>"
                                               placeholder="请输入生日">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empAge" value="${emp.age}"
                                               placeholder="请输入年龄">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empSalary" value="${emp.salary}"
                                               placeholder="请输入工资">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empPhone" value="${emp.phoneNum}"
                                               placeholder="请输入电话号码">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="email" class="form-control" name="empEmail" value="${emp.email}"
                                               placeholder="请输入邮箱">
                                    </div>
                                </td>
                                <td>
                                    <div class="dropdown">

                                        <button class="btn btn-default dropdown-toggle" type="button"
                                                data-toggle="dropdown"
                                                aria-haspopup="true" aria-expanded="true">
                                            请选择
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu">
                                            <li>
                                                <button class="btn btn-default" type="submit">提交
                                                </button>
                                            </li>
                                            <li>
                                                <button type="button" class="btn btn-default"
                                                        onclick="window.location.href='${pageContext.request.contextPath}/admin?method=deleteEmp&empId=${emp.id}'">
                                                    删除
                                                </button>
                                            </li>
                                            <li role="separator" class="divider"></li>
                                        </ul>
                                    </div>
                                </td>
                            </form>
                            </c:forEach>
                        </tr>
                        <tr>
                            <form action="${pageContext.request.contextPath}/admin?method=addEmp" method="post">
                                <td>
                                    id
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empName" placeholder="请输入员工名">
                                    </div>
                                </td>
                                <td>
                                    <select class="selectpicker show-tick form-control " multiple="multiple"
                                        <%--data-live-search="true"--%>
                                    >
                                            <%--@elvariable id="emp" type="com.xdwanj.pojo.Emp"--%>
                                            <%--@elvariable id="roleList" type="java.util.List"--%>
                                        <c:forEach items="${roleList}" var="role" varStatus="roleStatus">
                                            <option value="${role.id}:${role.roleName}" autocomplete="off"
                                                    <c:if test="${emp.roleBool.get(roleStatus.index) eq true}">
                                                        selected="selected"
                                                    </c:if> >
                                                    ${role.id}:${role.roleName}
                                            </option>
                                        </c:forEach>
                                    </select>
                                    <input class="selectValue" name="selectValue" type="hidden"/>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empSex" placeholder="请输入性别">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="date" class="form-control" name="empBirthday" placeholder="请输入生日">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empAge" placeholder="请输入年龄">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empSalary" placeholder="请输入工资">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="empPhone" placeholder="请输入电话号码">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="email" class="form-control" name="empEmail" placeholder="请输入邮箱">
                                    </div>
                                </td>
                                <td>
                                    <div class="dropdown">

                                        <button class="btn btn-default dropdown-toggle" type="button"
                                                data-toggle="dropdown"
                                                aria-haspopup="true" aria-expanded="true">
                                            请选择
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu">
                                            <li>
                                                <button class="btn btn-default" type="submit">提交
                                                </button>
                                            </li>
                                            <li></li>
                                            <li role="separator" class="divider"></li>
                                        </ul>
                                    </div>
                                </td>
                            </form>
                        </tr>
                    </table>
                </div>
                <c:if test="${markFun != null && 'emp' eq markFun}">
                    <%--@elvariable id="empList" type="com.xdwanj.util.PageBean"--%>
                    <%--@elvariable id="emp" type="com.xdwanj.util.PageBean"--%>
                    <nav>
                        <ul class="pagination">
                            <li>
                                <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_EMP})%>&currentPageNo=${empList.currentPageNo-1}"
                                   aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>

                            <c:forEach begin="1" end="${empList.totalPageCount}" varStatus="status">
                                <c:if test="${status.index == empList.currentPageNo}">
                                    <li class="active">
                                        <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_EMP})%>&currentPageNo=${status.index}">
                                                ${status.index}</a>
                                    </li>
                                </c:if>
                                <c:if test="${status.index != empList.currentPageNo}">
                                    <li>
                                        <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_EMP})%>&currentPageNo=${status.index}">
                                                ${status.index}</a>
                                    </li>
                                </c:if>
                            </c:forEach>

                            <li>
                                <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_EMP})%>&currentPageNo=${empList.currentPageNo+1}"
                                   aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                        </ul>
                    </nav>
                </c:if>
            </c:if>


            <c:if test="${markFun != null && 'commodity'eq markFun}"><%--@elvariable id="commodity" type="com.xdwanj.pojo.Commodity"--%>
                <div class="col-lg-3">
                    <label>商品名</label>
                    <div class="container-fluid">
                        <form action="${pageContext.request.contextPath}/admin?method=findCommodity" method="post">
                            <div class="input-group">
                                <input type="text" class="form-control" name="commodityName" placeholder="请输入商品名">
                                <span class="input-group-btn" style="width: 15vh;">
                                    <select class="form-control" name="commodityCategory">
                                        <%--@elvariable id="category" type="com.xdwanj.pojo.Category"--%>
                                        <%--@elvariable id="categoryList" type="java.util.List"--%>
                                        <c:forEach items="${categoryList}" var="category">
                                            <option value="${category.id}">${category.name}</option>
                                        </c:forEach>
                                    </select>
                                    <button class="btn btn-default" type="submit">搜索</button>
                                </span>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="col-md-12">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>
                                id
                            </th>
                            <th>
                                商品名
                            </th>
                            商品类别
                            <th>
                                价格
                            </th>
                            <th>
                                生产日期
                            </th>
                            <th>
                                过期日期
                            </th>
                            <th>
                                销售次数
                            </th>
                            <th>
                                介绍
                            </th>
                            <th>
                                提交或删除
                            </th>
                        </tr>
                        </thead>
                            <%--@elvariable id="commodityList" type="com.xdwanj.util.PageBean"--%>
                        <c:forEach items="${commodityList.content}" var="commodity">
                            <tr>
                                <form action="${pageContext.request.contextPath}/admin?method=updateCommodity"
                                      method="post">
                                    <td>
                                        <input type="text" class="form-control"
                                               name="commodityId"
                                               value="${commodity.id}">
                                    </td>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input class="form-control" name="commodityName"
                                                   placeholder="请输入商品名"
                                                   type="text"
                                                   value="${commodity.name}">
                                        </div>
                                    </td>
                                    <td>
                                        <select class="form-control" name="commodityCategory">
                                                <%--@elvariable id="category" type="com.xdwanj.pojo.Category"--%>
                                            <option value="${commodity.category.id}"
                                                    selected="selected">${commodity.category.name}</option>
                                            <c:forEach items="${categoryList}" var="category">
                                                <option value="${category.id}">${category.name}</option>
                                            </c:forEach>
                                        </select>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="commodityPrice"
                                                   value="${commodity.price}" placeholder="请输入价格">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="date" class="form-control"
                                                   name="commodityManufactureDate"
                                                   value="<fmt:formatDate value="${commodity.manufactureDate}" pattern="yyyy-MM-dd"/>"
                                                   placeholder="请输入生产日期">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="date" class="form-control"
                                                   name="commodityExpirationDate"
                                                   value="<fmt:formatDate value="${commodity.expirationDate}" pattern="yyyy-MM-dd"/>"
                                                   placeholder="请输入过期日期">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control"
                                                   name="commoditySalesNum"
                                                   value="${commodity.salesNum}" placeholder="请输入销售次数">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">

                                            <input type="text" class="form-control"
                                                   name="commodityInfo"
                                                   value="${commodity.info}" placeholder="请输入介绍">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="btn-group">

                                            <button class="btn btn-default dropdown-toggle" type="button"
                                                    data-toggle="dropdown"
                                                    aria-haspopup="true" aria-expanded="true">
                                                请选择
                                                <span class="caret"></span>
                                            </button>
                                            <ul class="dropdown-menu">
                                                <li>
                                                    <button class="btn btn-default" type="submit">提交
                                                    </button>
                                                </li>
                                                <li>
                                                    <button type="button" class="btn btn-default"
                                                            onclick="window.location.href='${pageContext.request.contextPath}/admin?method=deleteUser&uid=${user.id}'">
                                                        删除
                                                    </button>
                                                </li>
                                                <li role="separator" class="divider"></li>
                                            </ul>
                                        </div>
                                    </td>
                                </form>
                            </tr>
                        </c:forEach>
                        <tr>
                            <form action="${pageContext.request.contextPath}/admin?method=addCommodity" method="post">
                                <td>
                                    <input type="text" class="form-control"
                                           name="commodityId"
                                           value="${commodity.id}">
                                </td>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="commodityName"
                                               value="${commodity.name}"
                                               placeholder="请输入商品名">
                                    </div>
                                </td>
                                <td>
                                    <select class="form-control" name="commodityCategory">
                                            <%--@elvariable id="category" type="com.xdwanj.pojo.Category"--%>
                                        <option value="${commodity.category.id}"
                                                selected="selected">${commodity.category.name}</option>
                                        <c:forEach items="${categoryList}" var="category">
                                            <option value="${category.id}">${category.name}</option>
                                        </c:forEach>
                                    </select>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="commodityPrice"
                                               value="${commodity.price}" placeholder="请输入价格">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="date" class="form-control"
                                               name="commodityManufactureDate"
                                               value="<fmt:formatDate value="${commodity.manufactureDate}" pattern="yyyy-MM-dd"/>"
                                               placeholder="请输入生产日期">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="date" class="form-control"
                                               name="commodityExpirationDate"
                                               value="<fmt:formatDate value="${commodity.expirationDate}" pattern="yyyy-MM-dd"/>"
                                               placeholder="请输入过期日期">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control"
                                               name="commoditySalesNum"
                                               value="${commodity.salesNum}" placeholder="请输入销售次数">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">

                                        <input type="text" class="form-control"
                                               name="commodityInfo"
                                               value="${commodity.info}" placeholder="请输入介绍">
                                    </div>
                                </td>
                                <td>
                                    <button class="btn btn-default" type="submit">提交
                                    </button>
                                </td>
                            </form>
                        </tr>
                    </table>
                    <c:if test="${markFun != null && 'commodity' eq markFun}">
                        <%--@elvariable id="commodityList" type="com.xdwanj.util.PageBean"--%>
                        <nav>
                            <ul class="pagination">
                                <li>
                                    <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                            new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_COMMODITY})%>&currentPageNo=${commodityList.currentPageNo-1}"
                                       aria-label="Previous">
                                        <span aria-hidden="true">&laquo;</span>
                                    </a>
                                </li>
                                <c:forEach begin="1" end="${commodityList.totalPageCount}" varStatus="status">
                                    <c:if test="${status.index == commodityList.currentPageNo}">
                                        <li class="active">
                                            <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                                                    new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_COMMODITY})%>&currentPageNo=${status.index}">
                                                    ${status.index}</a>
                                        </li>
                                    </c:if>
                                    <c:if test="${status.index != commodityList.currentPageNo}">
                                        <li>
                                            <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                                                    new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_COMMODITY})%>&currentPageNo=${status.index}">
                                                    ${status.index}</a>
                                        </li>
                                    </c:if>
                                </c:forEach>

                                <li>
                                    <a href="${pageContext.request.contextPath}<%=UrlUtil.getUrl(AdminUserServlet.REQUEST_MAPPING,
                                       new String[]{AdminUserServlet.METHOD, AdminUserServlet.FIND_COMMODITY})%>&currentPageNo=${commodityList.currentPageNo+1}"
                                       aria-label="Next">
                                        <span aria-hidden="true">&raquo;</span>
                                    </a>
                                </li>

                            </ul>
                        </nav>
                    </c:if>
                </div>
            </c:if>


            <c:if test="${markFun != null && 'shoppingCart'eq markFun}">
                <div class="col-lg-2">
                    <label>购物车id</label>
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="请输入购物车id">
                        <span class="input-group-btn">
                        <button class="btn btn-default" type="button">搜索</button>
                    </span>
                    </div>
                </div>
                <div class="col-md-12">
                    <table class="table table-striped">
                        <tr>
                            <form>
                                <td>
                                    <div class="form-group">
                                        <label>商品购买数量</label>
                                        <input type="text" class="form-control" placeholder="请输入下单日期">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <label>添加日期</label>
                                        <input type="date" class="form-control" placeholder="请输入状态">
                                    </div>
                                </td>

                                <td>
                                    <label>提交或删除</label>
                                    <div class="dropdown">
                                        <button class="btn btn-default dropdown-toggle" type="button"
                                                data-toggle="dropdown"
                                                aria-haspopup="true" aria-expanded="true">
                                            请选择
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu">
                                            <li><a href="#" onclick="ChooseC()">提交</a></li>
                                            <li><a href="#" onclick="ChooseD()">删除</a></li>
                                            <li role="separator" class="divider"></li>
                                        </ul>
                                    </div>
                                </td>
                            </form>
                        </tr>
                    </table>
                </div>
            </c:if>


            <c:if test="${markFun != null && 'order'eq markFun}">
                <div class="col-lg-2">
                    <label>订单id</label>
                    <form action="${pageContext.request.contextPath}/admin?method=findOrder" method="post">
                    <div class="input-group">
                            <input type="text" class="form-control" name="orderId" placeholder="请输入订单id">
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="submit">搜索</button>
                            </span>
                    </div>
                    </form>
                </div>
                <div class="col-md-12">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>
                                id
                            </th>
                            <th>
                                下单日期
                            </th>
                            <th>
                                状态
                            </th>
                            <th>
                                商品数量
                            </th>
                            <th>
                                用户Id
                            </th>
                            <th>
                                商品Id
                            </th>
                            <th>
                                提交或删除
                            </th>
                        </thead>
                        <tbody>
                            <%--@elvariable id="orderList" type="com.xdwanj.util.PageBean"--%>
                            <%--@elvariable id="order" type="com.xdwanj.pojo.Order"--%>
                        <c:forEach items="${orderList.content}" var="order" varStatus="status">
                            <tr>
                                <form action="${pageContext.request.contextPath}/admin?method=updateOrder" method="post">
                                    <td>
                                        ${order.id}<input type="hidden" name="orderId" value="${order.id}">
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="date" class="form-control" name="orderDate"
                                                   value="<fmt:formatDate value="${order.ordersDate}" pattern="yyyy-MM-dd"/>"
                                                   placeholder="请输入下单日期">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="orderState"
                                                   value="${order.state}" placeholder="请输入状态">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="orderCommodityNumber"
                                                   value="${order.comNum}" placeholder="请输入商品数量">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="uid"
                                                   value="${order.userId}" placeholder="请输入用户Id">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="commodityId"
                                                   value="${order.commodityId}" placeholder="请输入商品Id">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="dropdown">
                                            <button class="btn btn-default dropdown-toggle" type="button"
                                                    data-toggle="dropdown"
                                                    aria-haspopup="true" aria-expanded="true">
                                                请选择
                                                <span class="caret"></span>
                                            </button>
                                            <ul class="dropdown-menu">
                                                <li>
                                                    <button class="btn btn-default" type="submit">提交
                                                    </button>
                                                </li>
                                                <li>
                                                    <button type="button" class="btn btn-default"
                                                            onclick="window.location.href='${pageContext.request.contextPath}/admin?method=deleteOrder&orderId=${order.id}'">
                                                        删除
                                                    </button>
                                                </li>
                                            </ul>
                                        </div>
                                    </td>
                                </form>
                            </tr>
                        </c:forEach>
                        <tr>
                            <form action="${pageContext.request.contextPath}/admin?method=addOrder" method="post">
                                <td>
                                    id
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="date" class="form-control" name="orderDate" placeholder="请输入下单日期">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="orderState"
                                               placeholder="请输入状态">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="orderCommodityNumber"
                                               placeholder="请输入商品数量">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="uid"
                                               placeholder="请输入用户Id">
                                    </div>
                                </td>
                                <td>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="commodityId"
                                               placeholder="请输入商品Id">
                                    </div>
                                </td>
                                <td>
                                    <button class="btn btn-default" type="submit">提交
                                    </button>
                                </td>
                            </form>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </c:if>
        </div>
    </div>
</div>
<input type="hidden" id="mh-markFun" value="${markFun}">
</body>
<script src="${pageContext.request.contextPath}/js/admin-user.js"></script>
</html>